import 'package:flutter/material.dart';

class FormPage extends StatelessWidget {
  const FormPage(this.youWantToShow, {Key? key}) : super(key: key);
  final String youWantToShow;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //浮动按钮，默然在右下，圆形
      floatingActionButton: FloatingActionButton(
        child: Text('自定义返回'),
        onPressed: () {
          //出栈，显示改页面压栈前的页面
          Navigator.of(context).pop();
        },
      ),
      appBar: AppBar(
        title: Text('Form Page'),
      ),
      body: Text(this.youWantToShow),
    );
  }
}
